﻿<UserControl x:Class="BFsharp.Samples.SL.Samples.ForumulaEditor"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:Controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
             xmlns:Samples="clr-namespace:BFsharp.Samples.SL"
             xmlns:Controls1="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"
             mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">

   
    <Controls1:DockPanel>
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="60"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="100"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" >
                <TextBlock>Sample:</TextBlock>
                <ComboBox Width="150" x:Name="Samples" ItemsSource="{Binding}" 
                          DisplayMemberPath="Name" />
            </StackPanel>
            <TextBox Grid.Row="1" x:Name="Formula" AcceptsReturn="True" 
                     HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"
                     Text="{Binding SelectedValue.Formula, ElementName=Samples}" />

            <Controls:GridSplitter Grid.Row="2" HorizontalAlignment="Stretch" />
            <StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Right">
                <Button Content="Compile" Click="Button_Click"/>
            </StackPanel>

            <TextBlock Grid.Row="4">Status:</TextBlock>
            <TextBox Grid.Row="5" IsReadOnly="True" x:Name="Status" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" Height="Auto" />

            <Controls:GridSplitter Grid.Row="6" HorizontalAlignment="Stretch"/>
            <StackPanel Grid.Row="7">

                <Button Click="Button_Click_1" Width="Auto">Execute</Button>
                <StackPanel Orientation="Horizontal">
                    <TextBlock>Results:</TextBlock>
                    <TextBox IsReadOnly="true" Width="150" x:Name="Results" />
                </StackPanel>
            </StackPanel>

            <Grid Grid.Row="8">
                <StackPanel>
                    <TextBlock>Providers</TextBlock>
                    <CheckBox x:Name="Math" IsChecked="{Binding SelectedValue.Math, Mode=OneWay, ElementName=Samples}">Math</CheckBox>
                    <CheckBox x:Name="Date" IsChecked="{Binding SelectedValue.Date, Mode=OneWay, ElementName=Samples}">Date</CheckBox>
                    <CheckBox x:Name="All" IsChecked="{Binding SelectedValue.All, Mode=OneWay, ElementName=Samples}">All</CheckBox>
                    <TextBlock>Using:</TextBlock>
                    <TextBox x:Name="Using" Height="60" AcceptsReturn="True" VerticalScrollBarVisibility="Auto" Text="{Binding SelectedValue.Using, Mode=OneWay, ElementName=Samples}" />
                    <CheckBox x:Name="SampleEntity" IsChecked="{Binding SelectedValue.SampleEntity, Mode=OneWay, ElementName=Samples}">SampleEntity</CheckBox>
                    <CheckBox x:Name="Custom" IsChecked="{Binding SelectedValue.Custom, Mode=OneWay, ElementName=Samples}">Custom</CheckBox>
                </StackPanel>
            </Grid>
        </Grid>
    </Controls1:DockPanel>
</UserControl>
